package com.gexin.model.activity;

import com.gexin.model.activity.base.BaseVistorIntegralLog;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.UUID;

/**
 * 业务名称:  t_vistor_integral_log() 
 */
@SuppressWarnings("serial")
public class VistorIntegralLog extends BaseVistorIntegralLog<VistorIntegralLog> {
	public static final VistorIntegralLog dao = new VistorIntegralLog();


	public List<VistorIntegralLog>  findList(String id){
		List<VistorIntegralLog> vistorOrders = VistorIntegralLog.dao.find(
				"select * from t_vistor_integral_log where user_id=" + id + " order by create_time desc");
		return vistorOrders;

	}

 	public  void setCommonCoupStatusDescType(String userId,BigDecimal completeSpeedIntegral, BigDecimal speedIntegral,
											 int incomeor, String desc, int type,BigDecimal incrementCoin,
											 BigDecimal incrementBillOfShopping,BigDecimal incrementReserve){

		this.setId(UUID.randomUUID()+"");
		this.setCoupon(speedIntegral);
		this.setRemainCoupon(completeSpeedIntegral);
		this.setUserId(userId);
		this.setDesc(desc);
		this.setIncomeOr(incomeor);
		this.setType(type);

		this.setCoin(incrementCoin);
		this.setBillOfShopping(incrementBillOfShopping);
		this.setReserve(incrementReserve);
		long date = new Date().getTime();
		this.setCreateTime(date);
		this.setUpdateTime(date);
	}
}
